package myProject.gwt.client;

import com.google.gwt.user.client.ui.Panel;
import com.google.gwt.user.client.ui.VerticalPanel;
import com.google.gwt.user.client.ui.Widget;

public class WidgetConnector {
	
	public static void connect(Widget container, Widget component){
		if(container instanceof Panel){
			((Panel)container).add(component);
		}
	}
	
	public static void connect(Widget container, Widget component1, Widget component2){
		if(container instanceof Panel){
			VerticalPanel vp = new  VerticalPanel();
			vp.add(component1);
			vp.add(component2);
			((Panel)container).add(vp);
		}
	}
}
